﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:sys="clr-namespace:System;assembly=mscorlib"
	mc:Ignorable="d"
	x:Class="CoreGallery.Visualization.ThumbnailUserControl"
	x:Name="ThumbnailUserControl1"
	d:DesignWidth="347" d:DesignHeight="347" Height="{Binding Path=Width, ElementName=ThumbnailUserControl1, Mode=Default}" Margin="0,0,0,0" Width="100">

	<UserControl.Resources>
		<FontFamily x:Key="fntfam">
			Times New Roman  
		</FontFamily>

		<sys:Double x:Key="fntsize">
			12
		</sys:Double>
		
		<!-- Multiply font size by FontFamily.Baseline.  Result is stored in xform.Value.M11. -->
		<TransformGroup x:Key="xform">
            <ScaleTransform ScaleX="{Binding Source={StaticResource fntfam}, Path=Baseline}" />
            <ScaleTransform ScaleX="{StaticResource fntsize}" />
        </TransformGroup>
	</UserControl.Resources>

	<Border Padding="2,2,2,2" CornerRadius="8,8,8,8" x:Name="ThumbnailBorder" Background="#FFFFFFFF">
		<DockPanel x:Name="LayoutRoot" Background="#FFFFFFFF" LastChildFill="True">
			<DockPanel.ContextMenu>
				<ContextMenu>
					<MenuItem Header="Preview Full-Size"/>
					<MenuItem Header="Change Capture Date..."/>
				</ContextMenu>
			</DockPanel.ContextMenu>
			<TextBlock x:Name="InfoTextblock" FontWeight="Normal" Text="Title" TextWrapping="Wrap" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource fntsize}"/>
			<Border Padding="2,2,2,2" BorderThickness="2,2,2,2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="8,8,8,8" Margin="5,5,5,5" Background="#FFFFFFFF" BorderBrush="#FF969696">
				<Border.BitmapEffect>
					<DropShadowBitmapEffect ShadowDepth="4" Softness="0.85"/>
                </Border.BitmapEffect>
                <Image x:Name="ThumbnailImage" Source="..\Autumn Leaves.jpg"/>
            </Border>
		</DockPanel>
	</Border>
</UserControl>